Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support index is ellipsis for getitem in static mode #32876

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

liym27
Copy link
Contributor

@liym27 liym27 commented May 12, 2021

PR types

New features

PR changes

APIs

Describe

As the title

For example:

tensor_x = paddle.to_tensor(np.array([[1,2],[3,4]]).astype(np.float32))
tensor_x[...]      # [[1,2],[3,4]]
tensor_x[..., 1]  # [2,4]

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented May 12, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@liym27 liym27 changed the title Static getitem ellipsis Support index is ellipsis for setitem in static mode May 12, 2021
@paddle-bot-old
Copy link

Sorry to inform you that cf24451's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@liym27 liym27 requested a review from zhhsplendid June 1, 2021 09:53
@liym27 liym27 changed the title Support index is ellipsis for setitem in static mode Support index is ellipsis for getitem in static mode Jun 2, 2021
zhhsplendid
zhhsplendid previously approved these changes Jun 2, 2021
Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liym27 liym27 merged commit a039fd7 into PaddlePaddle:develop Jun 9, 2021
lanxianghit pushed a commit that referenced this pull request Jun 15, 2021
…ist/Tensor/None/Ellipsis/bool (#33528)

* [cherry-pick 2.1] Polish code for _getitem_impl_ (#32868)

* [cherry-pick] Polish code for setitem and getitem (#32911)

* [slice getitem] Support getitem idx is Tensor or List (#33000)

* [getitem] Support index is None for getitem in static mode (#33001)

* [Static getitem] Support static Variable getitem for Ellipsis index (#32876)

* [static getitem]Support index is list bool for getitem in static mode (#33298)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants